/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tree;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author adam
 */
public class ArrayTab {
    
    private Map<String, Integer> aTab = new HashMap<String, Integer>();
    
    public void insert(String s, int i){
        aTab.put(s, i);
    }
    
    public void delete(String s){
        aTab.remove(s);
    }
    
    public boolean contains(String name) {
        return aTab.containsKey(name.toLowerCase());
    }
    
    public int numberOfDimension(String name){
        return aTab.get(name).intValue();
    }
    
    @Override
    public String toString() {
        return "ArrayTab: " + aTab;
    }
    
}
